//## begin module%3B86C770007C.cm preserve=no
//	  %X% %Q% %Z% %W%
//## end module%3B86C770007C.cm

//## begin module%3B86C770007C.cp preserve=no
//	+----------------------------------------------+
//	| SVMBR - A program for training SVMs          |
//	+----------------------------------------------+
//	| * Creator, modeling, coding:                 |
//	|    Marcelo Barros de Almeida                 |
//	|    barros@smar.com.br                        |
//	|    http://litc.cpdee.ufmg.br/~barros/        |
//	| * Coding, improvements, bug fixes:           |
//	|    Bernardo Penna                            |
//	|    bprc@brfree.com.br                        |
//	+----------------------------------------------+
//
//	 Copyright(c) 2002 by Marcelo Barros de Almeida
//	                            All rights reserved
//
//	-[CVS]------------------------------------------
//	$Author$
//	$Date$
//	$Source$
//	$Name$
//	$Revision$
//	------------------------------------------------
//## end module%3B86C770007C.cp

//## Module: data%3B86C770007C; Package specification
//## Subsystem: <Top Level>
//## Source file: D:\textotese\svmbr\src\data.h

#ifndef data_h
#define data_h 1

//## begin module%3B86C770007C.additionalIncludes preserve=no
//## end module%3B86C770007C.additionalIncludes

//## begin module%3B86C770007C.includes preserve=yes
//## end module%3B86C770007C.includes

// global
#include "global.h"
//## begin module%3B86C770007C.declarations preserve=no
//## end module%3B86C770007C.declarations

//## begin module%3B86C770007C.additionalDeclarations preserve=yes
//## end module%3B86C770007C.additionalDeclarations


//## begin Data%3B86C348005E.preface preserve=yes
//## end Data%3B86C348005E.preface

//## Class: Data%3B86C348005E
//	This classe holds the patterns and performs operations
//	on disk.
//## Category: Data package%3B88045D03B8
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

class Data 
{
  //## begin Data%3B86C348005E.initialDeclarations preserve=yes
  //## end Data%3B86C348005E.initialDeclarations

  public:

    //## Other Operations (specified)
      //## Operation: dotProd%998688344
      virtual REAL dotProd (UINT i1, UINT i2) = 0;

      //## Operation: dotProd%999139414
      virtual REAL dotProd (REAL *vec, UINT i2) = 0;

      //## Operation: dotProd%999139415
      virtual REAL dotProd (REAL *vec1, REAL *vec2) = 0;

      //## Operation: loadData%998688374
      virtual INT loadData () = 0;

      //## Operation: loadData%998880776
      virtual INT loadData (CHAR *file) = 0;

      //## Operation: setfileName%998880772
      VOID setfileName (CHAR *file);

      //## Operation: getnumExamples%998880785
      INT getnumExamples () const;

      //## Operation: gettarget%998880786
      INT gettarget (UINT i1) const;

      //## Operation: getpoint%998880792
      virtual REAL * getpoint (INT i1) = 0;

      //## Operation: getdim%998880793
      INT getdim () const;

      //## Operation: getdataType%999139394
      SHORT getdataType () const;

      //## Operation: setTarget%1002289385
      VOID setTarget (INT n);

      //## Operation: getnumClassA%1013528655
      //	/* NEVER CALL THIS FUNCTIONS BEFORE LOADDATA OR
      //	SETTARTGET (IF MULTICLASS) */
      INT getnumClassA () const;

      //## Operation: getnumClassB%1013528656
      //	/* NEVER CALL THIS FUNCTIONS BEFORE LOADDATA OR
      //	SETTARTGET (IF MULTICLASS) */
      INT getnumClassB () const;

    // Data Members for Class Attributes

      //## Attribute: NORMAL%3B86C46D02E0
      //## begin Data::NORMAL%3B86C46D02E0.attr preserve=no  public: static SHORT {U} 1
      static SHORT NORMAL;
      //## end Data::NORMAL%3B86C46D02E0.attr

      //## Attribute: SPARSE%3B86C4F0016C
      //## begin Data::SPARSE%3B86C4F0016C.attr preserve=no  public: static SHORT {U} 2
      static SHORT SPARSE;
      //## end Data::SPARSE%3B86C4F0016C.attr

      //## Attribute: BINARY%3B86C4FE0324
      //## begin Data::BINARY%3B86C4FE0324.attr preserve=no  public: static SHORT {U} 3
      static SHORT BINARY;
      //## end Data::BINARY%3B86C4FE0324.attr

    // Additional Public Declarations
      //## begin Data%3B86C348005E.public preserve=yes
      //## end Data%3B86C348005E.public

  protected:
    // Data Members for Class Attributes

      //## Attribute: point%3B86C395034D
      //## begin Data::point%3B86C395034D.attr preserve=no  protected: REAL ** {UA} 
      REAL **point;
      //## end Data::point%3B86C395034D.attr

      //## Attribute: target%3B86C3CA0173
      //## begin Data::target%3B86C3CA0173.attr preserve=no  protected: INT * {UA} 
      INT *target;
      //## end Data::target%3B86C3CA0173.attr

      //## Attribute: dim%3B86C3CC02D4
      //## begin Data::dim%3B86C3CC02D4.attr preserve=no  protected: INT {UA} 
      INT dim;
      //## end Data::dim%3B86C3CC02D4.attr

      //## Attribute: numExamples%3B86C3D3031A
      //## begin Data::numExamples%3B86C3D3031A.attr preserve=no  protected: INT {UA} 
      INT numExamples;
      //## end Data::numExamples%3B86C3D3031A.attr

      //## Attribute: index%3B86C45F03DA
      //## begin Data::index%3B86C45F03DA.attr preserve=no  protected: INT ** {UA} 
      INT **index;
      //## end Data::index%3B86C45F03DA.attr

      //## Attribute: fileName%3B86DA25022C
      //## begin Data::fileName%3B86DA25022C.attr preserve=no  protected: CHAR [_MAX_PATH] {UA} 
      CHAR  fileName[_MAX_PATH];
      //## end Data::fileName%3B86DA25022C.attr

      //## Attribute: dataType%3B8E52620249
      //## begin Data::dataType%3B8E52620249.attr preserve=no  protected: SHORT {UA} 
      SHORT dataType;
      //## end Data::dataType%3B8E52620249.attr

      //## Attribute: ntarget%3BBDB84C002C
      //## begin Data::ntarget%3BBDB84C002C.attr preserve=no  protected: INT * {UA} 
      INT *ntarget;
      //## end Data::ntarget%3BBDB84C002C.attr

      //## Attribute: multiClass%3BD197F8030E
      //## begin Data::multiClass%3BD197F8030E.attr preserve=no  protected: SHORT {UA} 
      SHORT multiClass;
      //## end Data::multiClass%3BD197F8030E.attr

      //## Attribute: numClassA%3C69418C0290
      //## begin Data::numClassA%3C69418C0290.attr preserve=no  protected: INT {UA} 
      INT numClassA;
      //## end Data::numClassA%3C69418C0290.attr

      //## Attribute: numClassB%3C694198007A
      //## begin Data::numClassB%3C694198007A.attr preserve=no  protected: INT {UA} 
      INT numClassB;
      //## end Data::numClassB%3C694198007A.attr

    // Additional Protected Declarations
      //## begin Data%3B86C348005E.protected preserve=yes
      //## end Data%3B86C348005E.protected

  private:
    // Additional Private Declarations
      //## begin Data%3B86C348005E.private preserve=yes
      //## end Data%3B86C348005E.private

  private: //## implementation
    // Additional Implementation Declarations
      //## begin Data%3B86C348005E.implementation preserve=yes
      //## end Data%3B86C348005E.implementation

};

//## begin Data%3B86C348005E.postscript preserve=yes
//## end Data%3B86C348005E.postscript

//## begin SparseData%3B86C7E90383.preface preserve=yes
//## end SparseData%3B86C7E90383.preface

//## Class: SparseData%3B86C7E90383
//## Category: Data package%3B88045D03B8
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

class SparseData : public Data  //## Inherits: <unnamed>%3B86D8C701C5
{
  //## begin SparseData%3B86C7E90383.initialDeclarations preserve=yes
  //## end SparseData%3B86C7E90383.initialDeclarations

  public:
    //## Constructors (specified)
      //## Operation: SparseData%998688398
      SparseData (CHAR *file);

    //## Destructor (generated)
      ~SparseData();


    //## Other Operations (specified)
      //## Operation: dotProd%998688345
      REAL dotProd (UINT i1, UINT i2);

      //## Operation: loadData%998880769
      INT loadData (CHAR *file);

      //## Operation: loadData%998880773
      INT loadData ();

      //## Operation: getpoint%998880789
      REAL * getpoint (INT i1);

      //## Operation: dotProd%999139416
      REAL dotProd (REAL *vec, UINT i2);

      //## Operation: dotProd%999139417
      REAL dotProd (REAL *vec1, REAL *vec2);

    // Additional Public Declarations
      //## begin SparseData%3B86C7E90383.public preserve=yes
      //## end SparseData%3B86C7E90383.public

  protected:
    // Additional Protected Declarations
      //## begin SparseData%3B86C7E90383.protected preserve=yes
      //## end SparseData%3B86C7E90383.protected

  private:
    // Additional Private Declarations
      //## begin SparseData%3B86C7E90383.private preserve=yes
      //## end SparseData%3B86C7E90383.private

  private: //## implementation
    // Data Members for Class Attributes

      //## Attribute: indexSize%3B9DFAE0006C
      //## begin SparseData::indexSize%3B9DFAE0006C.attr preserve=no  private: INT * {U} 
      INT *indexSize;
      //## end SparseData::indexSize%3B9DFAE0006C.attr

      //## Attribute: fullVec%3B9E541D0328
      //## begin SparseData::fullVec%3B9E541D0328.attr preserve=no  private: REAL * {U} 
      REAL *fullVec;
      //## end SparseData::fullVec%3B9E541D0328.attr

    // Additional Implementation Declarations
      //## begin SparseData%3B86C7E90383.implementation preserve=yes
      //## end SparseData%3B86C7E90383.implementation

};

//## begin SparseData%3B86C7E90383.postscript preserve=yes
//## end SparseData%3B86C7E90383.postscript

//## begin NormalData%3B86D86103A9.preface preserve=yes
//## end NormalData%3B86D86103A9.preface

//## Class: NormalData%3B86D86103A9
//## Category: Data package%3B88045D03B8
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

class NormalData : public Data  //## Inherits: <unnamed>%3B86D86103AA
{
  //## begin NormalData%3B86D86103A9.initialDeclarations preserve=yes
  //## end NormalData%3B86D86103A9.initialDeclarations

  public:
    //## Constructors (specified)
      //## Operation: NormalData%998688399
      NormalData (CHAR *file);

    //## Destructor (generated)
      ~NormalData();


    //## Other Operations (specified)
      //## Operation: dotProd%998688346
      REAL dotProd (UINT i1, UINT i2);

      //## Operation: loadData%998880770
      INT loadData (CHAR *file);

      //## Operation: loadData%998880774
      INT loadData ();

      //## Operation: getpoint%998880790
      REAL * getpoint (INT i1);

      //## Operation: dotProd%999139418
      REAL dotProd (REAL *vec, UINT i2);

      //## Operation: dotProd%999139419
      REAL dotProd (REAL *vec1, REAL *vec2);

    // Additional Public Declarations
      //## begin NormalData%3B86D86103A9.public preserve=yes
      //## end NormalData%3B86D86103A9.public

  protected:
    // Additional Protected Declarations
      //## begin NormalData%3B86D86103A9.protected preserve=yes
      //## end NormalData%3B86D86103A9.protected

  private:
    // Additional Private Declarations
      //## begin NormalData%3B86D86103A9.private preserve=yes
      //## end NormalData%3B86D86103A9.private

  private: //## implementation
    // Additional Implementation Declarations
      //## begin NormalData%3B86D86103A9.implementation preserve=yes
      //## end NormalData%3B86D86103A9.implementation

};

//## begin NormalData%3B86D86103A9.postscript preserve=yes
//## end NormalData%3B86D86103A9.postscript

//## begin BinaryData%3B86D93D01A6.preface preserve=yes
//## end BinaryData%3B86D93D01A6.preface

//## Class: BinaryData%3B86D93D01A6
//## Category: Data package%3B88045D03B8
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

class BinaryData : public Data  //## Inherits: <unnamed>%3B86D95000BD
{
  //## begin BinaryData%3B86D93D01A6.initialDeclarations preserve=yes
  //## end BinaryData%3B86D93D01A6.initialDeclarations

  public:
    //## Constructors (specified)
      //## Operation: BinaryData%998688400
      BinaryData (CHAR *file);

    //## Destructor (generated)
      ~BinaryData();


    //## Other Operations (specified)
      //## Operation: dotProd%998688347
      REAL dotProd (UINT i1, UINT i2);

      //## Operation: loadData%998880771
      INT loadData (CHAR *file);

      //## Operation: loadData%998880775
      INT loadData ();

      //## Operation: getpoint%998880791
      REAL * getpoint (INT i1);

      //## Operation: dotProd%999139420
      REAL dotProd (REAL *vec, UINT i2);

      //## Operation: dotProd%999139421
      REAL dotProd (REAL *vec1, REAL *vec2);

    // Additional Public Declarations
      //## begin BinaryData%3B86D93D01A6.public preserve=yes
      //## end BinaryData%3B86D93D01A6.public

  protected:
    // Additional Protected Declarations
      //## begin BinaryData%3B86D93D01A6.protected preserve=yes
      //## end BinaryData%3B86D93D01A6.protected

  private:
    // Additional Private Declarations
      //## begin BinaryData%3B86D93D01A6.private preserve=yes
      //## end BinaryData%3B86D93D01A6.private

  private: //## implementation
    // Data Members for Class Attributes

      //## Attribute: indexSize%3B9DFB230299
      //## begin BinaryData::indexSize%3B9DFB230299.attr preserve=no  private: INT * {U} 
      INT *indexSize;
      //## end BinaryData::indexSize%3B9DFB230299.attr

      //## Attribute: fullVec%3B9E542E00A2
      //## begin BinaryData::fullVec%3B9E542E00A2.attr preserve=no  private: REAL * {U} 
      REAL *fullVec;
      //## end BinaryData::fullVec%3B9E542E00A2.attr

    // Additional Implementation Declarations
      //## begin BinaryData%3B86D93D01A6.implementation preserve=yes
      //## end BinaryData%3B86D93D01A6.implementation

};

//## begin BinaryData%3B86D93D01A6.postscript preserve=yes
//## end BinaryData%3B86D93D01A6.postscript

// Class Data 


//## Other Operations (inline)
inline INT Data::getnumExamples () const
{
  //## begin Data::getnumExamples%998880785.body preserve=yes
	return numExamples;
  //## end Data::getnumExamples%998880785.body
}

inline INT Data::gettarget (UINT i1) const
{
  //## begin Data::gettarget%998880786.body preserve=yes
	return target[i1];
  //## end Data::gettarget%998880786.body
}

inline INT Data::getdim () const
{
  //## begin Data::getdim%998880793.body preserve=yes
	return dim;
  //## end Data::getdim%998880793.body
}

inline SHORT Data::getdataType () const
{
  //## begin Data::getdataType%999139394.body preserve=yes
	return dataType;
  //## end Data::getdataType%999139394.body
}

inline INT Data::getnumClassA () const
{
  //## begin Data::getnumClassA%1013528655.body preserve=yes
	return numClassA;
  //## end Data::getnumClassA%1013528655.body
}

inline INT Data::getnumClassB () const
{
  //## begin Data::getnumClassB%1013528656.body preserve=yes
	return numClassB;
  //## end Data::getnumClassB%1013528656.body
}

// Class SparseData 

// Class NormalData 

// Class BinaryData 

//## begin module%3B86C770007C.epilog preserve=yes
//## end module%3B86C770007C.epilog


#endif
